package com.example.yk_lx;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.alibaba.android.arouter.launcher.ARouter;
import com.blankj.utilcode.util.SPUtils;
import com.example.yk_lx.baseMVVM.BaseViewActivity;
import com.example.yk_lx.databinding.ActivityMainBinding;

public class MainActivity extends BaseViewActivity<ActivityMainBinding> {


    @Override
    protected int bindLayout() {
        return R.layout.activity_main;
    }

    @Override
    protected void initView() {
        //判断之前是否打开过项目
        if(SPUtils.getInstance().getString("islogin").isEmpty()){
            dataBinding.welcome.start(5);
            //记录一下打开过
            SPUtils.getInstance().put("islogin","sdfg");
        }else {
            ARouter.getInstance().build("/app/LoginActivity").navigation();
        }

    }

    @Override
    protected void initData() {

    }
}